<template>
<!-- 投保单上传 -->
<div>
  
  <policy-list v-if="show" :type="'保险单上传'" @goDocument="goDocument" ref="list">
            </policy-list>
           <el-dialog title="保险单上传" :visible.sync="dialogTableVisible">
                <upload-form :id="id" @close="close">
                </upload-form>
            </el-dialog>
</div>
</template>

<script>
import PolicyList from "@/components/Sell/PolicyList";
import uploadForm from "@/components/Sell/uploadForm";
export default {
  data() {
    return {
      show: false,
      number: "",
      dialogTableVisible: false,
      id:''
    };
  },
  components: {
    "policy-list": PolicyList,
    "upload-form": uploadForm
  },
  activated() {
    this.show = true;
     try {
      this.$refs.list.getDate();
    } catch (error) {      
    }    
  },
  methods: {
    goDocument(id) {  
      this.dialogTableVisible = true;
      this.id = id;
    },
    close() {      
      this.$refs.list.getDate();
      this.dialogTableVisible = false;
    }
  }
};
</script>

